package com.vict.service.impl;

import com.vict.framework.pay.annotation.PayAwait;
import com.vict.framework.pay.bean.PayAwaitDTO;
import com.vict.framework.pay.utils.PayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class PayService {

    @Autowired
    private PayService payService;

    public String caseSouYin(BigDecimal money){
        String payDtoId = PayUtils.createPayDtoId();

        PayAwaitDTO payAwaitDTO = new PayAwaitDTO();
        payAwaitDTO.setPayDtoId(payDtoId);
        payAwaitDTO.setMoney(money);
        payService.caseSouYinFinish(payAwaitDTO);

        return payDtoId;
    }

    @PayAwait
    public void caseSouYinFinish(PayAwaitDTO payAwaitDTO){

    }
}
